<?php
namespace app\api\validate;

use think\Validate;

class CateValidate extends Validate{
    protected $rule =   [
        'id'            => 'require|number',
        'curr'          => 'require|number',
        'limit'         => 'require|number',
        'type'          => 'require|number',
    ];
    
    protected $message  =   [
        'id.require'            => 'ID必须',
        'id.number'             => 'ID必须是数字',
        'curr.require'          => '页数必须',
        'curr.number'           => '页数数据类型错误',
        'limit.require'         => '条数必须',
        'limit.number'          => '条数数据类型错误',
        'type.require'          => '类型不能为空',
        'type.number'           => '类型数据类型错误',
    ];
    
    protected $scene = [
        'type'        => ['type'],
    ];
}